SignalEvent($EventName); $AdditionalMenuItems = []; foreach ($SignalResult as $HandlerName => $Results) { $HandlerNamePieces = explode("::", $HandlerName); $HandlerBaseName = $HandlerNamePieces[0]; $HandlerNamePieces = explode("\\", $HandlerBaseName); $HandlerBaseName = array_pop($HandlerNamePieces); foreach ($Results as $ItemLink => $ItemLabel) { if (!preg_match("/\.php/", $ItemLink)) { $ItemLink = "index.php?P=P_".$HandlerBaseName."_".$ItemLink; } $AdditionalMenuItems[$ItemLink] = $ItemLabel; } } asort($AdditionalMenuItems); return $AdditionalMenuItems; } /** * Display the menu items returned as a result of signalling an Event. * * This function passes the $EventName into another function and then * uses the returned array holding the menu items to construct and * display a menu list. * * @param string $EventName the Event name whose result we are intrested in. */ function DisplayAddedMenuItems(string $EventName): void { $MenuItems = GetAddedMenuItemsFromEventSignal($EventName); if (count($MenuItems)) { ?>

$ItemLabel) { if ($Index == ceil(count($MenuItems) / 2)) { ?>

User | Login | Idle | Where | From
--- | --- | --- | --- | ---
Get("UserName"); $LoginTime = StdLib::getPrettyTimestamp($User->Get("LastLoginDate")); $IdleTime = time() - strtotime($User->LastActiveDate()); $IdleTime = sprintf( "%d:%02d:%02d", $IdleTime / 3600, ($IdleTime % 3600) / 60, $IdleTime % 60 ); $Location = $User->lastLocation(); $Location = preg_replace("/P_([A-Za-z0-9]+)_/", "\\1:", $Location); if (!is_string($Location)) { $Location = "(unknown)"; } $From = StdLib::getHostName($User->LastIPAddress()); ?>

GetErrorMessages(); if (count($ErrMsgs)) { $Output = '

## Plugin Errors

'; foreach ($ErrMsgs as $PluginName => $Msgs) { if ($GLOBALS["G_PluginManager"]->PluginEnabled($PluginName)) { foreach ($Msgs as $Msg) { $Output .= "
- ".$PluginName.": ".$Msg."
"; $ErrMsgDisplayed = true; } } } $Output .= "

"; if (isset($ErrMsgDisplayed)) { print $Output; } } } # ----- MAIN ----------------------------------------------------------------- $AF = ApplicationFramework::getInstance(); # retrieve data for Currently Logged In section $UFactory = new UserFactory(); $LoggedInUsers = $UFactory->getLoggedInUsers(); $RecentlyLoggedInUsers = $UFactory->getRecentlyLoggedInUsers(); # retrieve data for System Information section $DatabaseServerVersion = (new Database())->getServerVersion(true); $HasRegistered = SystemConfiguration::getInstance()->isSet("LastRegisteredOn"); $SupportedImageFormats = implode(", ", \ScoutLib\RasterImageFile::supportedFormatNames()); $LoadAverageString = "(unknown)"; if (function_exists("sys_getloadavg")) { $Load = sys_getloadavg(); if ($Load !== false) { $LoadAverageString = sprintf("%.2f / %.2f / %.2f", $Load[0], $Load[1], $Load[2]); } } # clear caches if requested if (isset($_GET["AC"]) && ($_GET["AC"] == "ClearPageCache")) { $AF->ClearPageCache(); $AF->ClearTemplateLocationCache(); $AF->ClearObjectLocationCache(); } ?>
HasPriv(PRIV_SYSADMIN)) { if ($AF->GetOrphanedTaskCount()) { ?>

- WARNING: There are currently orphaned tasks.Please visit the Task Queue page and re-queue or delete the tasks as appropriate.

TaskExecutionEnabled()) { ?>

- PLEASE NOTE: Automatic task execution is currently disabled, which means that background tasks like search database updates and periodic mailings will not run.Visit the Task Queue page to re-enable task execution.

HasPriv(PRIV_SYSADMIN, PRIV_COLLECTIONADMIN)) { ?>

# Collection Administration

- Metadata Field Editor
- Qualifier Editor
- Metadata Field Ordering
- Search Configuration
- Rebuild Search Database

- Import Tab-Delimited Data
- Purge Sample Records
- Rebuild Recommender Database

HasPriv(PRIV_SYSADMIN, PRIV_USERADMIN)) { ?>

# User Administration

- Edit Users
- Import User Accounts
- Export User Accounts

- Track User Comments

HasPriv(PRIV_SYSADMIN)) { ?>

# System Administration

- System Configuration
- File Integrity Report
- Edit Custom Privilege Flags

- Plugins
- Task Queue
- Update Registration
- Register with Scout

HasPriv(PRIV_SYSADMIN, PRIV_USERADMIN)) { ?>

# Users Currently Logged In

# Users Recently Logged In

HasPriv(PRIV_SYSADMIN)) { ?>

# Recent Log Messages

GetLogEntries(10); if (count($SysLogEntries)) { $LevelStrings = [ ApplicationFramework::LOGLVL_FATAL => "Fatal", ApplicationFramework::LOGLVL_ERROR => "Error", ApplicationFramework::LOGLVL_WARNING => "Warn", ApplicationFramework::LOGLVL_INFO => "Info", ApplicationFramework::LOGLVL_DEBUG => "Debug", ApplicationFramework::LOGLVL_TRACE => "Trace", ]; foreach ($SysLogEntries as $Entry) { # linkify any URLs in the message $Msg = htmlspecialchars($Entry["Message"]); $MaxDisplayedUrlLen = 50; $Msg = preg_replace( "~([[:alpha:]]+://[^<>[:space:]]{1," .$MaxDisplayedUrlLen."})([^<>[:space:]]*)~", "\\1", $Msg ); $RowClasses = "mv-content-sysadmin-logmsgs-row" ." mv-content-sysadmin-logmsgs-row-" .strtolower($LevelStrings[$Entry["Level"]]); ?>
(no log messages found)

# System Information

Metavus Version |
PHP Version |
MySQL Version |
Database Name | DBName(); ?>
Supported Image Formats |
PHP Configuration Summary | phpinfo()
Server Time |
Server Load Average | (1/5/15 minutes)
Page Cache | PageCacheEnabled()) { $CacheInfo = $AF->GetPageCacheInfo(); print number_format($CacheInfo["NumberOfEntries"])." entries"; if ($CacheInfo["NumberOfEntries"]) { print ", oldest from " .StdLib::getPrettyTimestamp($CacheInfo["OldestTimestamp"]) ." " ."CLEAR"; } } else { print "(disabled)"; } ?>
SignalEvent("EVENT_SYSTEM_INFO_LIST"); if (count($SignalResult)) { foreach ($SignalResult as $HandlerName => $Items) { foreach ($Items as $Label => $Content) { ?>